/*
 * author      : 吴中勤 
 * date        : 2018/8/17
 * description : SAP 采购
 */

package com.deepexi.adapter.sdk.sap.dto.order;

import java.util.ArrayList;
import java.util.List;

public class SapPurchaseRequestBody extends SapOrderRequestBody {

    public SapPurchaseRequestBody() {
        super();
        this.action = ACTION_PURCHASE;
    }

    // === setter & getter ====

//    @SerializedName("BUKRS")
//    protected String shopCode;
//    // SAP生成的订单号
//    @SerializedName("VBELN")
//    protected String sapOrderNo;
//    @SerializedName("AUFART")
//    protected String orderType;
//    @SerializedName("DATUM")
//    protected String deliveryDate = "";
//    @SerializedName("ACTION")
//    protected String action = "";
//    @SerializedName("CUSTOMER")
//    protected String memberId;
//    @SerializedName("USERID")
//    protected String operatorId;
//    @SerializedName("ORDERID")
//    protected String mobyOrderId;
//    @SerializedName("Items")
//    protected List<SapOrderLine> lineList;

    public void addSapOrderLine(SapOrderLine sapOrderLine) {
        if (null == this.lineList) this.lineList = new ArrayList<>(1);
        this.lineList.add(sapOrderLine);
    }

    // === setter ===
    public void setShopCode(String shopCode) {
        this.shopCode = shopCode;
    }

    public void setSapOrderNo(String sapOrderNo) {
        this.sapOrderNo = sapOrderNo;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public void setDeliveryDate(String deliveryDate) {
        this.deliveryDate = deliveryDate;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public void setOperatorId(String operatorId) {
        this.operatorId = operatorId;
    }

    public void setMobyOrderId(String mobyOrderId) {
        this.mobyOrderId = mobyOrderId;
    }

    public void setLineList(List<SapOrderLine> lineList) {
        this.lineList = lineList;
    }
}
